@extends('layouts.admin.index')
@section('title', '分类列表')
@section('admin-css')
    .gradeX td{
        text-align: center;
    }
@endsection
@section('current')
    <a href="{{ url('admin/cateList') }}" class="current">分类列表</a>
@endsection
@section('content')
    <div class="widget-box">
        <div class="widget-title"><span class="icon"><i class="icon-th"></i></span>
            <h5>分类列表</h5>
        </div>
        <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
                <thead>
                    <tr>
                        <th>分类ID</th>
                        <th>分类名称</th>
                        <th>父类ID</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>

                    @foreach ($cates as $c)
                        <tr class="gradeX">
                            <td>{{ $c['id'] }}</td>
                            <td style="text-align:left; text-indent:30px;width: 400px">
                                {{ str_repeat('&nbsp;', $c['count'] * 10).'|----'.$c['cate_name'] }}
                            </td>
                            <td>{{ $c['parent_id'] }}</td>
                            <td>
                                <a href="{{ url('admin/cateEdit/'.$c['id']) }}">
                                    <i class="icon icon-edit" title="修改"></i>
                                </a>&nbsp;&nbsp;
                                <a href="{{ url('admin/cateDel/'.$c['id']) }}">
                                    <i class="icon icon-trash" title="删除"></i>
                                </a>
                            </td>
                        </tr>
                    @endforeach

                </tbody>
            </table>
        </div>
    </div>
@endsection